package com.example.front.task;

import com.example.front.arrange.AbstractTask;
import com.example.front.arrange.TaskDependent;
import lombok.extern.slf4j.Slf4j;

/**
 * YyyPlugin
 *
 * @author liming2
 * @date 2023/11/6 18:33
 */

@Slf4j
@TaskDependent(BbTask.class)
public class CcTask extends AbstractTask<Taxi> {

    @Override
    public Taxi handle() {
        Taxi p = this.getDependResult(BbTask.class);
        //log.info("C param:{}", p);
        RideContext context = this.getDependResult(Start2Task.class);
        Taxi taxi = new Taxi(context.getTaxiB().getNameTaxi() + "->C");
        context.setTaxiC(taxi);
        return taxi;
    }
}
